﻿using System;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations.Schema;
using YiSha.Util;

namespace YiSha.Entity.QixingManage
{
    /// <summary>
    /// 创 建：admin
    /// 日 期：2024-12-29 18:01
    /// 描 述：Courses实体类
    /// </summary>
    [Table("courses")]
    public class CoursesEntity : BaseEntity
    {
        /// <summary>
        /// 标题
        /// </summary>
        /// <returns></returns>
        public string title { get; set; }
        /// <summary>
        /// 发布人ID
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(StringJsonConverter))]
        public long? user_id { get; set; }
        /// <summary>
        /// 发布时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? publish_time { get; set; }
        /// <summary>
        /// 收费金额
        /// </summary>
        /// <returns></returns>
        public decimal? price { get; set; }
        /// <summary>
        /// 文字描述
        /// </summary>
        /// <returns></returns>
        public string description { get; set; }
        /// <summary>
        /// 浏览次数
        /// </summary>
        /// <returns></returns>
        public int? view_count { get; set; }
        /// <summary>
        /// 创建时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? created_at { get; set; }
        /// <summary>
        /// 更新时间
        /// </summary>
        /// <returns></returns>
        [JsonConverter(typeof(DateTimeJsonConverter))]
        public DateTime? updated_at { get; set; }
        /// <summary>
        /// 状态：0-下架，1-上架
        /// </summary>
        /// <returns></returns>
        public byte? status { get; set; }
    }
}
